import HomeView from '../../views/HomeView.vue'
import TestView from '../../views/TestView'
import Login from '../../views/login/index'
import Reg from '../../views/login/reg'
import Forget from '../../views/login/forget'
import ManageIndex from '../../views/manage/index'

export default [
    {
        path: '/',
        name: 'member',
        component: HomeView
    },
    {
        path: '/test',
        name: 'member',
        component: TestView
    },
    {
        path: '/login',
        name: 'member',
        component: Login
    },
    {
        path: '/reg',
        name: 'member',
        component: Reg
    },
    {
        path: '/forgot',
        name: 'member',
        component: Forget
    },
    {
        path: '/manage',
        name: 'manage',
        redirect: '/manage/userinfo?modelname=codes',
        component: ManageIndex,
        meta: { title: '个人中心' },
        children: [
            {
                path: '/manage/userinfo?modelname=codes',
                name: 'manage',
                component: () => import('../../views/manage/user/UserInfo'),
                meta: { title: '个人账户', requireAuth: true },
            },
            {
                path: '/manage/userpass',
                name: 'manage',
                component: () => import('../../views/manage/user/UserInfo'),
                meta: { title: '修改密码', requireAuth: true },
            },
        ]
    }
]
